<?php

if (isset ($_GET['notes'])) {

	$connexion = mysql_connect("localhost", "root", "");
	mysql_select_db("etunote", $connexion);
	
	extract($_GET);
	enregister($etud, $notes, $url);
	echo $etu . " Hello; " . "exercice" . " avec la notes : ". $notes;
}else{
	echo "Y'a RIEN !!";
}

function enregister($etud, $notes, $url) {
	//$date= date("Y-m-j H:i:s");
	$sql = "INSERT INTO etudiants(etud, notes, exercice) VALUES ('$etud', '$notes', $exercice) ";
	mysql_query($sql) or die('Requête invalide : ' . mysql_error());
	
}

?>
